<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with constructor error - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=constructor+error</link>
      <pubDate>Sun, 08 Aug 2021 20:56:56 +0000</pubDate>
         <description>Tagged with constructor error - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedconstructor+error/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Problems with java using jmcvideo library: constructor error</title>
      <link>https://forum.processing.org/two/discussion/12392/problems-with-java-using-jmcvideo-library-constructor-error</link>
      <pubDate>Fri, 04 Sep 2015 00:08:14 +0000</pubDate>
      <dc:creator>wbandel</dc:creator>
      <guid isPermaLink="false">12392@/two/discussions</guid>
      <description><![CDATA[<p>I am creating a sketch using the kinect with the simpleopenni library and jmcvideo library to do video scrubbing. I found a basic example and edited it to work with the kinect. Everything worked fine on my Mac, but now that I am trying to move everything over to a PC I can't get the libraries to work right. I finally got java to work on the PC using the library, but I am now getting an error that reads "The constructor JMCMovie(videojumpkinect, String, int) is undefined and it hightlights "return new JMCMovie(this, filename, RGB);" and I can not figure out why it doesn't like that part of the code because it worked fine on my Mac.</p>

<p>I tried using other libraries, such as the default video library and a sketch I found for that, which didn't work. And then the gsvideo library, which gave me no errors, but only showed a black screen (the background). I'd prefer to use this library, because I know it at least works on Macs. Any help would be greatly appreciated as my knowledge of code is very limited.</p>

<pre lang="javascript">
import SimpleOpenNI.*;
SimpleOpenNI kinect;

import jmcvideo.*;
import processing.opengl.*;
JMCMovie myMovie;
double movieDuration;
float ratio =0.0;
float old_mouse_pos = 0;

void setup() {
  kinect = new SimpleOpenNI(this);
  kinect.enableDepth();
  kinect.enableUser();

  size(640, 480, P2D);
  //size(640,480,P2D);
  //background(0);
  // stroke(255, 0, 0);
  //strokeWeight(5);
  //textSize(20);

  myMovie = movieFromDataPath("drop.mov");

  myMovie.pause();

  movieDuration = myMovie.getDuration();
}

JMCMovie movieFromDataPath(String filename)
{
  return new JMCMovie(this, filename, RGB);
}

void draw()
{
  kinect.update();

  PImage depthImage =kinect.depthImage();
 // image(depthImage, 640, 0);

  IntVector userList = new IntVector();
  kinect.getUsers(userList);

  if (userList.size()&gt;0) {
    int userId = userList.get(0);

    if (kinect.isTrackingSkeleton(userId)) {
      PVector leftHand = new PVector();
      //  PVector rightHand = new PVector();

      kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_LEFT_HAND, leftHand);

      //  kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_RIGHT_HAND, rightHand);

      // println(leftHand.y, rightHand.y);

      image(myMovie, 0, 0, 640, 480);
      //  image(myMovie, 0, 0, myMovie.width, myMovie.height);
      if (old_mouse_pos !=leftHand.y) {
        ratio=(float)(height+leftHand.y)/(2*height);
        myMovie.setCurrentTime((1-ratio)*movieDuration);
      }
      old_mouse_pos=leftHand.y;
    }
  }
  if (userList.size()</pre>
]]></description>
   </item>
   </channel>
</rss>